package com.guijianpan.system.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.guijianpan.system.domain.RoleMenu;
import com.guijianpan.system.repository.RoleMenuRepository;

@Service
public class RoleMenuService {
	
	@Autowired
	private RoleMenuRepository roleMenuRepository;

	@Transactional
	public RoleMenu save(RoleMenu RoleMenu) {
		return roleMenuRepository.save(RoleMenu);
	}

	public List<RoleMenu> findAll() {
		return (List<RoleMenu>) roleMenuRepository.findAll();
	}

	public RoleMenu findOne(Long id) {
		return roleMenuRepository.findOne(id);
	}

}
